// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------


import request from "@/utils/request.js";

// 管家列表
export function guanjiaList(data) {
	return request.get("guanjia/guanjiaList", data, {
		noAuth: true	
	});
}
// 管家详情
export function guanjiaDetails(data) {
	return request.get("guanjia/guanjiaDetails", data, {});
}
// 收藏列表
export function relationList(data) {
	return request.get("taocan/relationList", data, {});
}
// 取消收藏
export function cancelcollect(data) {
	return request.post("taocan/cancel_relation", data, {});
}
// 收藏套餐
export function relation(data) {
	return request.post("taocan/relation", data, {});
}
// 套餐列表
export function taocanList(data) {
	return request.get("taocan/taocanList", data, {});
}
// 套餐详情
export function taocanDetails(data) {
	return request.get("taocan/taocanDetails", data, {});
}
// 预约套餐
export function orderCreate(data) {
	return request.post("taocan/orderCreate", data, {});
}
// 亲友列表
export function loveList(data) {
	return request.get("love/loveList", data, {});
}
// 亲情号添加
export function addnumber(data) {
	return request.post("love/add_number", data, {});
}
// 删除号码
export function delnumber(data) {
	return request.post("love/del_number", data, {});
}
// 新增【修改】提交记录
export function jianCreate(data) {
	return request.post("jiankang/jianCreate", data, {});
}
// 记录列表
export function jianList(data) {
	return request.get("jiankang/jianList", data, {});
}
// 删除
export function orderdel(data) {
	return request.post("jiankang/orderdel", data, {});
}
// 记录详情
export function jiaOrderDetails(data) {
	return request.get("jiankang/jiaOrderDetails", data, {});
}
// 企业套餐分类
export function taocanCategory(data) {
	return request.get("taocan/taocanCategory", data, {});
}
// 可绑设备类型
export function deviceTypeList(data) {
	return request.get("shebei/deviceTypeList", data, {});
}
// 绑定设备
export function bindDevice(data) {
	return request.post("shebei/bindDevice", data, {});
}
// 我的设备列表
export function deviceList(data) {
	return request.get("shebei/deviceList", data, {});
}
// 设备详情
export function deviceDetails(data) {
	return request.get("shebei/deviceDetails", data, {});
}
// 解绑设备
export function devicedel(data) {
	return request.post("shebei/devicedel", data, {});
}
// 我的消息
export function noticeList(data) {
	return request.get("shebei/noticeList", data, {});
}



/**
 * 统计数据
 */
export function getStatisticsInfo() {
	return request.get("admin/order/statistics", {}, {
		login: true
	});
}
/**
 * 订单月统计
 */
export function getStatisticsMonth(where) {
	return request.get("admin/order/data", where, {
		login: true
	});
}
/**
 * 订单月统计
 */
export function getAdminOrderList(where) {
	return request.get("admin/order/list", where, {
		login: true
	});
}
/**
 * 订单改价
 */
export function setAdminOrderPrice(data) {
	return request.post("admin/order/price", data, {
		login: true
	});
}
/**
 * 订单备注
 */
export function setAdminOrderRemark(data) {
	return request.post("admin/order/remark", data, {
		login: true
	});
}
/**
 * 订单详情
 */
export function getAdminOrderDetail(orderId) {
	return request.get("admin/order/detail/" + orderId, {}, {
		login: true
	});
}

/**
 * 退款订单详情
 */
export function getAdminRefundOrderDetail(orderId) {
	return request.get("admin/refund_order/detail/" + orderId, {}, {
		login: true
	});
}

/**
 * 订单发货信息获取
 */
export function getAdminOrderDelivery(orderId) {
	return request.get(
		"admin/order/delivery/gain/" + orderId, {}, {
			login: true
		}
	);
}

/**
 * 订单发货保存
 */
export function setAdminOrderDelivery(id, data) {
	return request.post("admin/order/delivery/keep/" + id, data, {
		login: true
	});
}
/**
 * 订单统计图
 */
export function getStatisticsTime(data) {
	return request.get("admin/order/time", data, {
		login: true
	});
}
/**
 * 线下付款订单确认付款
 */
export function setOfflinePay(data) {
	return request.post("admin/order/offline", data, {
		login: true
	});
}
/**
 * 订单确认退款
 */
export function setOrderRefund(data) {
	return request.post("admin/order/refund", data, {
		login: true
	});
}

/**
 * 获取快递公司
 * @returns {*}
 */
export function getLogistics(data) {
	return request.get("logistics", data, {
		login: false
	});
}

/**
 * 订单核销
 * @returns {*}
 */
export function orderVerific(verify_code, is_confirm) {
	return request.post("order/order_verific", {
		verify_code,
		is_confirm
	});
}

/**
 * 获取物流公司模板
 * @returns {*}
 */
export function orderExportTemp(data) {
	return request.get("admin/order/export_temp", data);
}

/**
 * 获取订单打印默认配置
 * @returns {*}
 */
export function orderDeliveryInfo() {
	return request.get("admin/order/delivery_info");
}

/**
 * 配送员列表
 * @returns {*}
 */
export function orderOrderDelivery() {
	return request.get("admin/order/delivery");
}

/**
 * 退款列表
 * @returns {*}
 */
export function orderRefund_order(where) {
	return request.get("admin/refund_order/list", where, {
		login: true
	});
}

/**
 * 订单备注（退款）
 */
export function setAdminRefundRemark(data) {
	return request.post("admin/refund_order/remark", data, {
		login: true
	});
}

/**
 * 订单同意退货
 */
export function agreeExpress(data) {
	return request.post("admin/order/agreeExpress", data, {
		login: true
	});
}